<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.bci.pwtz.common.util.SpringUtil" %>
<%@ page import="com.bci.pwtz.service.CompanyRoleService" %>
<%@ page import="com.bci.pwtz.common.ActionCodeConstants" %>
<%@page import="com.bci.pwtz.mysql.model.CompanyAction"%>
<%@ include file="/user/common.jsp"%>
<%
	CompanyRoleService companyRoleService = (CompanyRoleService)SpringUtil.getBean("companyRoleService");
	boolean canEditRole = false;
	boolean canAddRole = false;
	boolean canDeleteRole = false;
	CompanyUser company_user = (CompanyUser) session.getAttribute("user");
	if(company_user!=null) 
	{
	    canEditRole = companyRoleService.checkHasAction(request,ActionCodeConstants.COMPANY_USER_ROLE_EDIT);
	    canAddRole = companyRoleService.checkHasAction(request,ActionCodeConstants.COMPANY_USER_ROLE_ADD);
	    canDeleteRole = companyRoleService.checkHasAction(request,ActionCodeConstants.COMPANY_USER_ROLE_DELETE);
	}
	CompanyService cService = (CompanyService)SpringUtil.getBean("companyService");
	boolean isVip = cService.isVip(user.getLastCompanyId());
	List<CompanyAction> roleActionList = companyRoleService.selectCompanyAction();
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>配网数据-用户权限管理</title>
<link href="<%=basePath %>user/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath %>user/css/llcss.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="<%=basePath %>js/jquery/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=basePath %>user/js/hd_ll.js"></script>
<script type="text/javascript" src="<%=basePath %>user/js/common.js"></script>
<script type="text/javascript" src="<%=basePath %>user/m/js/roleList.js"></script>

</head>

<script type="text/javascript">
var canEdit=<%=canEditRole%>;
var canDelete = <%=canDeleteRole%>;
var isVip = <%=isVip%>;
</script>
<body bgcolor="white">
<div class="all_cover"></div>
<%if(isVip){ %>
<!-- 添加分组框_begin -->
<div class="add_group_box">

</div>
<!-- 添加分组框_end -->
<%} %>
	<%@ include file="/user/head.jsp"%>
	<div class="pwsj_cont_box">
	<%@ include file="/user/left.jsp"%>
		<!-- 右侧内容_begin -->
	<div class="pwsj_cont_right_box">
		<!-- 权限管理_begin -->
			<div class="limit_manage">
				<div class="position" style="margin-bottom:3px">
					<a href="rolelist.jsp" class="last">权限管理</a>
				</div>
				<%if(isVip && canAddRole){%> <div class="add_group" onclick="javascrpit:openrole('','0');">添加分组</div><!-- 添加成员按钮 --><%}%>
				<div class="pwsj_right_group_cont_title">
					<ul class="group_title_ul">
						<li class="number">序号</li>
						<li class="group_name">分组名称</li>
						<li class="manage_item">管理项</li>
					</ul>				
				</div>
				<div class="pwsj_right_group_cont_title" id="contentInfo">
				</div>
			</div>
		<!-- 权限管理_end -->
		<!-- 分页_begin -->
		<div class="page" id="rolepage">
	    </div>
	    <!-- 分页_end -->
	</div>
	<!-- 右侧内容_end -->
		<!--main_right end-->
	<div class="clear"></div>	
	</div>
	<!--main end-->
<%@ include file="/user/foot.jsp"%>
</body>
</html>
